﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LoginMaster.aspx.cs" Inherits="LoginMaster" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="Stylesheet" href="Styles/StyleSheet.css" type="text/css" />
    <script type="text/javascript" src="Scripts/jquery.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#DivLoginMaster').css('margin-top', ($('#LoginMasterMain').height() - $('#DivLoginMaster').height()) / 2);
            $('#<%=txtUserName.ClientID %>').blur(function () {
                HiddenShow();
            });
            $('#<%=txtPass.ClientID %>').blur(function () {
                HiddenShow();
            });
            function HiddenShow() {
                if ($('#<%=txtUserName.ClientID %>').val() == "") {
                    $('#<%=lblError.ClientID %>').html("Enter User Name.");
                    $('#<%=btnLoginMaster.ClientID %>').attr('disabled', true);
                }
                else if ($('#<%=txtPass.ClientID %>').val() == "") {
                    $('#<%=lblError.ClientID %>').html("Enter Password.");
                    $('#<%=btnLoginMaster.ClientID %>').attr('disabled', true);
                }
                else {
                    $('#<%=lblError.ClientID %>').html("");
                    $('#<%=btnLoginMaster.ClientID %>').attr('disabled', false);
                }
            }
        });
    </script>
</head>
<body>
    <form id="form" runat="server">
    <div id="LoginMasterMain">
        <div id="DivLoginMaster">
            <div id="InDivLoginMaster">
                <h3>Login</h3>
                <p>
                    <asp:Label ID="Label1" runat="server" Text="User Name:" Width="150px" CssClass="lblTitle"></asp:Label>
                    <asp:TextBox ID="txtUserName" runat="server" Width="150px"></asp:TextBox>
                </p>
                <p>
                    <asp:Label ID="Label2" runat="server" Text="Password:" Width="150px" CssClass="lblTitle"></asp:Label>
                    <asp:TextBox ID="txtPass" runat="server" Width="150px" TextMode="Password"></asp:TextBox>
                </p>
                <asp:Panel ID="panlChangePassword" runat="server">
                    <p>
                        <asp:Label ID="Label3" runat="server" Text="NewPassword:" Width="150px" CssClass="lblTitle"></asp:Label>
                        <asp:TextBox ID="txtNewpassword" runat="server" Width="150px" 
                            TextMode="Password"></asp:TextBox>
                        <p>
                        <asp:Label ID="Label4" runat="server" Text="Passwork confirm:" Width="150px" CssClass="lblTitle"></asp:Label>
                        <asp:TextBox ID="txtPasswordConfirm" runat="server" Width="150px" 
                                TextMode="Password"></asp:TextBox>
                    </p>
                        <p>
                        </p>
                    </p>
                </asp:Panel>
                <p>
                    <asp:RadioButton ID="rbtnAdmin" Text="Admin" runat="server" GroupName="TypeLogin" Checked="True" />
                    <asp:RadioButton ID="rbtnHR" Text="HR" runat="server" GroupName="TypeLogin"  />
                    <asp:RadioButton ID="rbtnInterview" Text="Interviewer" runat="server" GroupName="TypeLogin"  />
                </p>
                <p>
                    <asp:Label ID="lblError" runat="server" Text="" ForeColor="Red"></asp:Label>
                </p>
                <p>
                    <asp:Button ID="btnLoginMaster" runat="server" Text="Login" 
                        onclick="btnLoginMaster_Click" />
                </p>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
